package com.springcloud.regin.controller;

import com.springcloud.regin.service.HelloFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Desc: Feign 客户端
 * @Date: 2020-06-25
 * @Version:v1.0
 */
@RestController
public class FeignHelloController {

    @Autowired
    private HelloFeignService helloFeignService;

    @GetMapping("/hello")
    public String sayHello(@RequestParam(value = "name", defaultValue = "feign client") String name) {
        return helloFeignService.sayHello(name);
    }
}
